<?php
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}
$groups=C::t('common_usergroup')->range('','','desc');
if(submitcheck('editsubmit')){
	
	$gs=dhtmlspecialchars($_GET['yhz']);
	
	foreach($gs as $k => $v){
		if(C::t('#aljbd#aljbd_usergroup')->fetch($k)){
			C::t('#aljbd#aljbd_usergroup')->update($k,array(
				'brand'=>$v['brand'],
				'notice'=>$v['notice'],
				'album'=>$v['album'],
				'good'=>$v['good'],
				'consume'=>$v['consume'],
				'grouptitle'=>$groups[$k]['grouptitle'],
			));
		}else{
			C::t('#aljbd#aljbd_usergroup')->insert(array(
				'groupid'=>intval($k),
				'brand'=>$v['brand'],
				'notice'=>$v['notice'],
				'album'=>$v['album'],
				'good'=>$v['good'],
				'consume'=>$v['consume'],
				'grouptitle'=>$groups[$k]['grouptitle'],
			)); 
		}
	}
	cpmsg(lang('plugin/aljbd','s49'),'action=plugins&operation=config&do='.$_GET['do'].'&identifier=aljbd&pmod=admin&brand=yhzqx');

}else{
	
	$aljbd_groups=C::t('#aljbd#aljbd_usergroup')->range();
	include template('aljbd:yhz');
}
?>